package io;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

public class ScannerDemo {
    public static void main(String[] args) {
        try(InputStream inputStream=new FileInputStream("./test.txt")) {
            Scanner in=new Scanner(inputStream);
            while(in.hasNextInt()) {
                System.out.println(in.next());
            }
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
}
